class AppConstants {
  static const String appName = 'Jiazhuang Flutter Base';
  static const String appVersion = '1.0.0';
  
  // API相关常量
  static const String baseUrl = 'https://api.example.com';
  static const String apiVersion = 'v1';
  static const Duration connectTimeout = Duration(seconds: 30);
  static const Duration receiveTimeout = Duration(seconds: 30);
  static const Duration sendTimeout = Duration(seconds: 30);
  
  // 缓存相关常量
  static const String cacheKey = 'app_cache';
  static const Duration cacheMaxAge = Duration(days: 7);
  static const int cacheMaxCount = 100;
  
  // 存储相关常量
  static const String storageKey = 'app_storage';
  static const String userPrefsKey = 'user_prefs';
  static const String themeKey = 'theme_mode';
  static const String languageKey = 'language';
  
  // 分页相关常量
  static const int pageSize = 20;
  static const int maxRetryCount = 3;
  
  // 动画相关常量
  static const Duration animationDuration = Duration(milliseconds: 300);
  static const Duration shortAnimationDuration = Duration(milliseconds: 150);
  static const Duration longAnimationDuration = Duration(milliseconds: 500);
  
  // 图片相关常量
  static const String defaultAvatar = 'assets/images/default_avatar.png';
  static const String placeholderImage = 'assets/images/placeholder.png';
  static const String errorImage = 'assets/images/error.png';
  
  // 文件相关常量
  static const int maxFileSize = 10 * 1024 * 1024; // 10MB
  static const List<String> allowedImageTypes = ['jpg', 'jpeg', 'png', 'gif', 'webp'];
  
  // 正则表达式
  static const String emailRegex = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$';
  static const String phoneRegex = r'^1[3-9]\d{9}$';
  static const String passwordRegex = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{8,}$';
  
  // 错误代码
  static const int errorCodeUnknown = -1;
  static const int errorCodeNetwork = -2;
  static const int errorCodeTimeout = -3;
  static const int errorCodeCancel = -4;
  static const int errorCodeAuth = 401;
  static const int errorCodeForbidden = 403;
  static const int errorCodeNotFound = 404;
  static const int errorCodeServer = 500;
  
  // 路由名称
  static const String routeHome = '/home';
  static const String routeLogin = '/login';
  static const String routeProfile = '/profile';
  static const String routeSettings = '/settings';
  static const String routeAbout = '/about';
  
  // 调试相关
  static const bool isDebugMode = true;
  static const bool enableLogger = true;
  static const bool enableCache = true;
}